package cn.iocoder.yudao.module.promotion.controller.app.message;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.promotion.controller.admin.message.vo.MessageSaveReqVO;
import cn.iocoder.yudao.module.promotion.service.message.MessageService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;

@Tag(name = "管理后台 - 留言管理")
@RestController
@RequestMapping("/promotion/message")
@Validated
public class AppMessageController {

    @Resource
    private MessageService messageService;

    @PostMapping("/create")
    @Operation(summary = "创建留言管理")
    public CommonResult<Long> createMessage(@RequestBody MessageSaveReqVO createReqVO) {
        return success(messageService.createMessage(createReqVO));
    }

}